/*
 * TagFloat.h
 *
 *  Created on: 19 juin 2011
 *      Author: Pierrick Caillon <pierrick@megami.fr>
 */

#ifndef TAGFLOAT_H_
#define TAGFLOAT_H_

#include "NamedTag.h"
#include "NumericValueTag.h"

namespace NamedBinaryTag
{

class __attribute__((visibility("default"))) TagFloat: public NamedBinaryTag::NamedTag,
		public NamedBinaryTag::NumericValueTag<sizeof(float)>
{
private:
	float value;
public:
	TagFloat();
	virtual ~TagFloat();

	TagTypes get_TagType() const;

	void Read(std::istream &input, bool ignoreName);
	void Write(std::ostream &output, bool ignoreName) const;

	float get_Value() const;
	void set_Value(float value);

	ITag *clone() const;
protected:
	TagFloat(void *root) : NamedTag(root) {}
	ITag *clone(void *newRoot) const;
};

}

#endif /* TAGFLOAT_H_ */
